<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEmailCodeRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('email_code_records', function (Blueprint $table) {
            $table->increments('id');
            $table->string('email')->notNull()->default('')->comment('邮箱地址');
            $table->string('code')->notNull()->default('')->comment('邮箱验证码');
            $table->text('content')->comment('邮件内容');
            $table->tinyInteger('status')->notNull()->default(0)->comment('0已发送 1发送失败');
            $table->string('remark')->comment('备注');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('email_code_records');
    }
}
